<?php
/**
 * 用户购物表model
 */
class RestaurantstyyOrderGoodsModel extends BaseModel{
	protected $tableName = 'restaurantstyy_order_goods';
	protected $_link = array(
		'restaurant_goods_category' => array(
			'mapping_type' => BELONGS_TO,
			'mapping_name' => 'restaurant_goods_category',
			'class_name' => 'RestaurantstyyGoodsCategory',
			'foreign_key' => 'category_id',
			'mapping_fields' => 'category_id,category_name',
		),
		'restaurant_goods' => array(
			'mapping_type' => BELONGS_TO,
			'mapping_name' => 'restaurant_goods',
			'class_name' => 'RestaurantstyyGoods',
			'foreign_key' => 'goods_id',
			'mapping_fields' => 'goods_id,goods_name,goods_sum,goods_logo',
		),
		'restaurant_info' => array(
			'mapping_type' => BELONGS_TO,
			'mapping_name' => 'restaurant_info',
			'class_name' => 'RestaurantstyyInfo',
			'foreign_key' => 'restaurant_id',
			'mapping_fields' => "restaurant_id,restaurant_name",
		),
	);
}